<template>
  <grid :head="gridHead" :grid="gridData"/>
</template>

<script>
import grid from '@/components/scrollGrid'
import summary from '@/net/summary'

export default {
  name: 'projectDisGrid',
  components: { grid },
  data () {
    return {
      gridHead: [
        { name: 'XZQHMC', value: '行政区划'},
        { name: 'JHSL_H_S', value: '计划改造户数'},
        { name: 'ZT11', value: '确户数'},
        { name: 'startWork', value: '开工总数(户/台)'},
        { name: 'JHWCL', value: '开工率'},
        { name: 'uninstall', value: '未安装(户/台)'},
        { name: 'underConstruction', value: '施工中(户/台)'},
        { name: 'install', value: '安装完毕(户/台)'},
        { name: 'AZWBL', value: '完成率'},
        { name: 'operationMonitor', value: '运行监控(户/台)'}
      ],
      gridData: [{
        adcd: '合计',
        planTransform: 0,
        ensureFamily: 61398, 
        startWork: '0/0',
        startWorkRate: '0.00%',
        uninstall: '0/0',
        underConstruction: '0/0',
        install: '0/0',
        finishRate: '0.00%',
        operationMonitor: ''
      }]
    }
  },
  created () {
    summary.getSummary().then(res => {
      res.forEach(value => {
        value.JHWCL += '%'
        value.AZWBL += '%'
        value.startWork = value.SUMSL_H + '/' + value.SUMSL_SB
        value.uninstall = value.ZT21 + '/' + value.ZT12
        value.underConstruction = value.ZT22 + '/' + value.ZT13
        value.install = value.ZT23 + '/' + value.ZT14
        value.operationMonitor = value.ZT25 + '/' + value.ZT16
      })
      this.gridData = res
    })
  }
}
</script>

<style>
</style>
